package com.xoa.service.equipment.impl;

import com.xoa.dao.equipment.LimsEquipReparlogFileMapper;
import com.xoa.model.equipment.LimsEquipReparlogFileWithBLOBs;
import com.xoa.service.equipment.EquipReparlogFileService;
import com.xoa.util.LimsJson;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;

public class EquipReparlogFileServiceImpl implements EquipReparlogFileService {
    @Autowired
    private LimsEquipReparlogFileMapper limsEquipReparlogFileMapper;
    @Override
    public LimsJson insertSelective(HttpServletRequest request, LimsEquipReparlogFileWithBLOBs limsEquipReparlogFile) {
        LimsJson limsJson = new LimsJson(1,"err");
        int count = 0;
        count =  limsEquipReparlogFileMapper.insertSelective(limsEquipReparlogFile);
        if(count>0){
            limsJson.setCount(0);
            limsJson.setMsg("上传成功");
        }else {
            limsJson.setMsg("上传失败");
        }
        return limsJson;
    }
}
